#ifndef __PT_CAMERA_H__
#define __PT_CAMERA_H__

#pragma comment(lib,"Strmiids.lib")

#include <stdio.h>
#include <dshow.h>
#include "qedit.h"
#include "defs.h"


class PTCamera {

public:
	PTCamera( void );
	~PTCamera( void );

	bool Init( void );

	bool Run( void );
	bool Pause( void );
	bool Stop( void );
	bool Capture( PTBitmap &bmp );

	void Release( void );

private:
	IGraphBuilder *pGraphBuilder;
	ICaptureGraphBuilder2 *pCaptureGraphBuilder;
	IMediaControl *pMediaControl;
	IBaseFilter *pDeviceFilter;

	bool  bIsActive;	
	TCHAR sDevName[256];

};


#endif